package com.anasoft.os.s4j.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.thoughtworks.selenium.Selenium;

/**
 * Describes the embedded Selenium server configuration.
 * 
 * @see SeleniumSession
 * 
 * @author vojtech.szocs
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
@Inherited
public @interface EmbeddedSeleniumServer {

    /**
     * Should an embedded Selenium server be started prior
     * to starting a new {@link Selenium} session?
     * <p>
     * When disabled, you have to run the Selenium server
     * on your own.
     */
    boolean enabled();
    
    /**
     * Should the server return static resources more slowly?
     */
    boolean slowStaticResources() default false;
    
    /**
     * If set to <tt>true</tt>, a single browser window
     * will be launched with the application under test
     * placed inside a sub frame.
     * <p>
     * If set to <tt>false</tt>, two separate browser
     * windows will be launched (one for Selenium server
     * logs/progress and one for the application under
     * test).
     * <p>
     * Note that some applications might have issues
     * when running inside a sub frame.
     */
    boolean singleWindow() default false;
    
    /**
     * Turn this option on if you have troubles with
     * self-signed SSL certificates.
     */
    boolean trustAllSSLCertificates() default true;
    
}
